//
//  MineViewController.m
//  07_Work
//
//  Created by dllo on 16/7/23.
//  Copyright © 2016年 yh. All rights reserved.
//

#import "MineViewController.h"
#import "MineView.h"
#import "LogViewController.h"
#define WIDTH self.view.frame.size.width
#define HEIGHT self.view.frame.size.height


@interface MineViewController ()

@end

@implementation MineViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationController.navigationBarHidden = YES;
    UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
    button.frame = CGRectMake(WIDTH / 2 - 50, 50, 100, 100);
    button.layer.cornerRadius = 50;
    button.layer.masksToBounds = YES;
    [button setBackgroundImage:[UIImage imageNamed:@"logo"] forState:UIControlStateNormal];
    [button addTarget:self action:@selector(click:) forControlEvents:UIControlEventTouchUpInside];
    
    UIView *view = [MineView createImageViewFrame:CGRectMake(0, 0, WIDTH, 240) color:[UIColor colorWithRed:0.247 green:0.655 blue:0.471 alpha:1.000] button:button];
    [self.view addSubview:view];
    
}

- (void)click:(UIButton *)button {
    LogViewController *logVC = [[LogViewController alloc] init];
    [self.navigationController presentViewController:logVC animated:YES completion:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
